<template>
  <su-popup
    :show="show"
    type="bottom"
    round="20"
    @close="emits('close')"
    showClose
    backgroundColor="#000"
  >
    <view class="model-box">
      <view class="header">
        <view class="title">购买藏品</view>
      </view>
      <view class="details ">
        <view class="details-t ss-flex ss-col-center">
          <image class="details-t-l" src="@/static/img/inheritanceOfficer-1.png"></image>
          <view class="details-t-r">
            <view class="text-1">汽车减震器</view>
            <view class="text-2">当前价格：￥500.00</view>
            <view class="text-2">发行价格：￥500.00</view>
            <view class="text-2">当前挂单：82</view>
          </view>
        </view>
        <view class="details-b ss-flex ss-col-center ss-row-between">
          <view class="text-1">钱包余额：2000</view>
          <view class="text-2">当前可购买数量：40  </view>
        </view>
      </view>

    </view>
    <view class="modal-footer ss-flex">
      <button class="confirm-btn " @tap="onConfirm">立即购买</button>
    </view>
  </su-popup>
</template>
<script setup>
  import { computed, reactive, ref, unref } from 'vue';
  import { code } from '@/sheep/validate/form';

  const props = defineProps({
    modelValue: {
      type: Object,
      default() {
      },
    },
    show: {
      type: Boolean,
      default: false,
    },
  });
  const emits = defineEmits(['confirm', 'close']);
  const priceSort = ref(0);


  const onConfirm = async () => {
    console.log(123);
    emits('confirm', 1);
  };
</script>
<style lang="scss" scoped>

  .header {
    padding: 16px 18px;
    box-sizing: border-box;

    .title {
      font-weight: 400;
      font-size: 18px;
      line-height: 18px;
      color: #F5F6F8;
    }
  }

  .model-box {
    padding: 0 15px;
    box-sizing: border-box;
    .details {
      padding: 12px;
      box-sizing: border-box;
      background: #1E1E1E;
      border-radius: 10px;
      .details-t {
        padding-bottom: 14px;
        border-bottom: 1px solid #353535;
        .details-t-l {
          width: 94px;
          height: 94px;
          margin-right: 16px;
        }

        .details-t-r {
          padding: 6px 0;
          box-sizing: border-box;
          .text-1 {
            font-weight: 400;
            font-size: 14px;
            color: #FFFFFF;
            line-height: 14px;
            margin-bottom: 14px;
          }

          .text-2 {
            font-weight: 300;
            font-size: 11px;
            color: #D9D9D9;
            line-height: 11px;

            &:not(:last-child) {
              margin-bottom: 10px;
            }
          }
        }
      }
      .details-b{
        padding: 12px 0 5px;
        box-sizing: border-box;
        font-weight: 400;
        font-size: 12px;
        color: #FFFFFF;
        line-height: 12px;
      }
    }
  }


  .modal-footer {
    width: 100%;
    padding: 16px 15px;
    box-sizing: border-box;
  }

  .confirm-btn {
    width: 100%;
    height: 50px;
    line-height: 50px;
    font-weight: 500;
    font-size: 16px;
    color: #090909;
    background: linear-gradient(90deg, #45C9F0, #36F6AF);
    border-radius: 25px;
  }


</style>
